[DeadCode] Add fixture to keep constructor params with autowire attribute#7783
[DeadCode] Add fixture to keep constructor params with autowire attribute#7783darthf1 wants to merge 3 commits intorectorphp:mainfrom
Conversation
|
Could you provide documentation link when add autowire attribute on |
|
You mean a link like https://symfony.com/doc/current/service_container/autowiring.html?
Do you want it in the fixture? Or just here? |
|
Add to fixture is fine, move parent class under Source |
|
You could probably give the same arguments for other attributes as well: from https://symfony.com/doc/current/reference/attributes.html#dependency-injection: |
|
|
||
| namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveParentDelegatingConstructorRector\Fixture; | ||
|
|
||
| abstract class AbstractDo |
There was a problem hiding this comment.
|
Its hard to do it in the web interface ;) Ill come back later and do it through the IDE. |
|
@darthf1 Let's close this one then. Feel free to open a up a new PR from the IDE 👍 |
RemoveParentDelegatingConstructorRectorremoves the constructor of classDoSomething. But the$filterLocatorparam has anautowireattribute so it doesn't just delegates the variable to the parent but it also adds metadata and I expect it to be kept as-is.